import { Component, Output, EventEmitter, OnInit } from '@angular/core';
import { NavParams, ModalController } from '@ionic/angular';
import { VgAPI } from 'videogular2/core';

@Component({
    selector: 'update-modal',
    templateUrl: './update-modal.html',
    styleUrls: ['update-modal.scss']
})
export class UpdateModal implements OnInit {

    updateList;   // 更新内容

    constructor(
        public navParams: NavParams, public modalCtrl: ModalController
    ) { }

    ngOnInit() {
        console.log('弹框更新内容', this.navParams.data.updateMenus);
        this.updateList = this.navParams.data.updateMenus ? this.navParams.data.updateMenus.split(' ') : [];
    }


    /**
     * 关闭弹框
     */
    close() {
        this.modalCtrl.dismiss(false);
    }

    sure() {
        this.modalCtrl.dismiss(true);
    }

}
